package com.zq.api.cart;

import com.zq.api.util.FeignInterceptorAddHelper;
import com.zq.common.util.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * @Author 张乔
 * @Date 2025/2/2 16:41
 */
@FeignClient(value = "sa-car",
        configuration = FeignInterceptorAddHelper.class)       // 请求拦截器 （关键代码))
public interface CartFeignClient {

    @GetMapping("/car/cart-info/auth/getAllChecked")
    Result<Object> getAllChecked(@RequestHeader("userToken") String token);


    @GetMapping("/car/cart-info/getByOrderId/{orderId}")
    Result<Object> getByOrderId(@PathVariable("orderId") Long orderId);

    @GetMapping("/car/cart-info/auth/getAllCheckedAndCheck")
    Result<Object> getAllCkeckedcart(@RequestHeader("userToken") String token);

    @GetMapping("/car/cart-info/deleteChecked")
    Result<Object> deleteChecked(@RequestHeader("userToken") String token);

}
